<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Launch Button</title>
    <style>
        body {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background: linear-gradient(135deg, #f6d365, #fda085);
            font-family: Arial, sans-serif;
        }

        .launch-button {
            background-color: #ff6f61;
            border: none;
            color: white;
            padding: 15px 30px;
            font-size: 20px;
            font-weight: bold;
            border-radius: 30px;
            cursor: pointer;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .launch-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
        }

        .launch-button:active {
            transform: translateY(0);
            box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
        }

        .controls {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            align-items: center;
        }

        .color-picker, .speed-selector {
            padding: 5px;
            font-size: 16px;
            border: 1px solid #ccc;
            border-radius: 5px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            transition: box-shadow 0.2s;
        }

        .color-picker:hover, .speed-selector:hover {
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
        }
        .speed-selector {
        width: 200px; /* 宽度 */
        padding: 10px; /* 内边距 */
        font-size: 16px; /* 字体大小 */
        border: 2px solid #3498db; /* 边框 */
        border-radius: 8px; /* 圆角 */
        background-color: #f0f8ff; /* 背景颜色 */
        background-image: url('data:image/svg+xml,...'); /* 自定义箭头图标 */
        background-repeat: no-repeat;
        background-position: right 10px center; /* 将箭头定位在右边 */
        appearance: none; /* 移除默认的箭头 */
        -webkit-appearance: none; /* Safari中的表现 */
        -moz-appearance: none; /* Firefox中的表现 */
        cursor: pointer; /* 光标 */
        transition: all 0.3s ease; /* 动画过渡效果 */
    }

    .speed-selector:focus {
        border-color: #2980b9; /* 聚焦时边框颜色变化 */
        outline: none; /* 去掉默认的焦点框 */
    }

    .speed-selector option {
        padding: 10px; /* 选项的内边距 */
    }
    </style>
</head>
<body>
    <button class="launch-button" onclick="launchRocket()">发射</button>
    <div class="controls">
        <input type="color" class="color-picker" id="colorPicker" value="#ff6f61" onchange="updateButtonColor()">
        <select class="speed-selector" id="speedSelector">
            <option value="fast">快</option>
            <option value="medium" selected>中</option>
            <option value="slow">慢</option>
        </select>
    </div>

    <script>
        function launchRocket() {
            const speed = document.getElementById('speedSelector').value;
            alert(`火箭已以${speed === 'fast' ? '快速' : speed === 'medium' ? '中速' : '慢速'}发射！`);
        }

        function updateButtonColor() {
            const colorPicker = document.getElementById('colorPicker');
            const launchButton = document.querySelector('.launch-button');
            launchButton.style.backgroundColor = colorPicker.value;
        }
    </script>
</body>
</html>
